<extend name="Public:innerbase" />
<block name="css">
<style>
#uploadFile{
	position: absolute;
	opacity: 0;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	margin:0;
	padding:0;
	cursor: pointer;
}
</style>
</block>
<block name="content">
<div class="container-fluid">
	<div class="page-header wm-page-header">
		<h4>认证导师</h4>
		<code><?php echo C('WAP_DOMAIN').U('Wap/Ski/teacher',['token'=>session('token')]);?></code>
	</div>
	<div role="tabpanel tabbable tabbable-custom">
	  <!-- Nav tabs -->
		<ul class="nav nav-tabs" role="tablist">
			<li role="presentation">
				<a href="{:U('student')}" aria-controls="home" role="tab">认证学员</a>
			</li>
			<li role="presentation" class="active">
				<a href="#" aria-controls="profile" role="tab">认证导师</a>
			</li>
		</ul>
		<!-- Tab panes -->
		<div class="tab-content" style="padding-top:5px;">
			<div role="tabpanel" class="tab-pane active" id="student">
				<div class="upload-button" style="margin:10px 0;" >
					<span class="btn btn-primary">
					<input class="upload" type="file" name="file" id="uploadFile" />
					导入认证导师
					</span>
				</div>
				<table class="table wm-table-bordered table-hover table-striped">
					<thead>
					<tr>
					<th width="50">姓名</th>
					<th width="120">等级</th>
					<th width="120">领证时间</th>
					<th width="120">身份证号码</th>
					<th width="120">手机号</th>
					<!--<th width="200">操作</th>-->
					</tr>
					</thead>
					<tbody>
					<volist name="list" id="vo"> 
					<tr>
					<td>{$vo.name}</td>
					<td>{$vo.level}</td>
					<td>{$vo.certificate_time|date="Y-m-d",###}</td>
					<td>{$vo.card_number}</td>
					<td>{$vo.mobile}</td>
					<!--<td>
					<a class="btn btn-xs btn-default" href="{:U('student_edit?id='.$vo['id'])}">修改</a>
					<a class="btn btn-xs btn-danger" href="{:U('stu_delete?id='.$vo['id'])}">删除</a>
					</td>-->
					</tr>
					</volist>
					</tbody>
				</table>
			</div>
			<div role="tabpanel" class="tab-pane" id="teacher"></div>
		</div>
	</div>
	<div>{$page}</div>
</div>
<div class="modal fade" id="indicatorModal" role="dialog">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-body">
				<i class="fa fa-lg fa-spinner fa-spin"></i>&nbsp;正在上传数据，请稍候...
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</block>
<block name="js">
<script src="/Public/Common/js/jquery.ajaxfileupload.js"></script>
<script type="text/javascript">
$("#uploadFile").AjaxFileUpload({
	action: "{:U('Ski/teacher_import')}",
	onSubmit: function(filename) {
		$('#indicatorModal').modal('show');
		return true;
	},
	onComplete: function(filename, response) {
		$('#indicatorModal').modal('hide');
		location.reload();
	}
});
</script>
</block>